﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace CellarDoor.Gui.Elements
{
    public class UiContextMenu : UiMenu
    {
        public UiContextMenu()
            : base()
        {
            Initialize();
        }

        public UiContextMenu(UiElement parent)
            : base(parent)
        {
            Initialize();
        }

        private void Initialize()
        {
            ElementName = "ContextMenu";
            this.Padding = new UiPadding(2, 2, 20, 2);
        }

        public override UiMenuItem AddMenuItem(UiMenuItem item)
        {
            base.AddMenuItem(item);
            item.ElementName = "ContextMenuItem";
            item.Dock = UiDockStyles.Top;
            item.SubMenu.Align = UiAlignStyle.OutsideRight | UiAlignStyle.Top;
            
            return item;
        }
    }
}
